An HDR (High Dynamic Range) technology is developed in a conventional film age. By partially increasing or decreasing brightness, hierarchies of a bright part and a dark part of a photo. As long as a terminal device captures images whose compositions are the same and exposures are different, a high dynamic range image may be composited.
With increasing requirements of users on images, some terminal devices also use the HDR technology to capture images. The terminal device obtains, through capturing, images of different exposures by setting exposures of different levels, then analyses multiple frames of images by using an HDR composite algorithm, and extracts some details of different images to perform composition, so as to composite several low dynamic range images to a higher dynamic range image.
However, currently, it is relatively simple for the terminal device to select exposures of different levels, and cannot satisfy special requirements of some scenarios. In some scenarios, after HDR processing is performed on a captured image, an abnormal artificial effect may occur. Consequently, image quality is relatively poor.
For example, an existing terminal device mainly counts overexposed and underexposed cases in a scenario, and designs, by experience, a group or multiple groups of exposures of fixed levels, to capture images of different exposures. Limited exposures of several levels cannot achieve an expected effect. For example, for an overexposed scenario, EV (Exposure Value) values of three images are respectively (1, 0, −1.5). For an underexposed scenario, EV values of three images are respectively (+1.5, 0, −1). However, quality of an image obtained in this manner is relatively poor.